import Vue from 'vue'

import 'normalize.css/normalize.css' // 重置样式表

// element-ui
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import locale from 'element-ui/lib/locale/lang/en' // 语言

import '@/styles/index.scss' // 全局样式

import App from './App'
import store from './store'
import router from './router'
import '@/permission' // 权限

// svg图标
import '@/icons' // icon

// echarts
import 'echarts'
import ECharts from "vue-echarts";

// 使用mock 
if (process.env.NODE_ENV === 'production') {
  const { mockXHR } = require('../mock')
  mockXHR()
}

Vue.component('v-chart', ECharts) //全局注册

Vue.use(ElementUI, { locale })
Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
